<form id="form" class="container-fluid" action="{$submit_url}">
    <p id="notice" class="text-warning"></p>
    <div class="form-group">
        <label class="control-label">标题</label>
        <input class="input" name="title" value="{$info.title}">
    </div>
    <div class="form-group">
        <label class="control-label">位置</label>
        <select name="vb_id" class="input">
            {foreach $vb_list as $key => $item}
            <option value="{$item.id}" data-notice="{$item.notice}" {$info.vb_id==$item.id || $vb_id==$item.id?'selected':''}>{$item.title}</option>
            {/foreach}
        </select>
    </div>
    <div class="form-group">
        <label class="control-label">图片</label>
        <input type="hidden" class="m-upload" name="image" value="{$info.image}">
    </div>
    <div class="form-group">
        <label class="control-label">链接</label>
        <input class="input" name="url" value="{$info.org_url}">
    </div>
    <div class="form-group">
        <label class="control-label">内容</label>
        <div id="content">{$info.org_content}</div>
        <textarea name="content"  style="height: 350px;width: 100%;display: none">{$info.org_content}</textarea>
    </div>
    <div class="form-group">
        <label class="control-label">排序</label>
        <input type="text" class="input w200" name="sort" value="{$info.sort}">
    </div>
    <div class="form-group">
        <label class="control-label">状态</label><br>
        <div class="btn-group" data-toggle="buttons">
            {foreach $status_list as $key => $item}
            <label class="btn {$info.status==$key?'active':''}">
                <input type="radio" {$info.status==$key?'checked':''} name="status" value="{$key}"> {$item}
            </label>
            {/foreach}
        </div>
    </div>
    <div class="form-group">
        <input type="hidden" name="id" value="{$info.id}">
       <input type="submit" class="btn btn-primary" value="提交">
    </div>
</form>
<script type="text/javascript" src="/static/wangEditor/release/wangEditor.min.js"></script>
<script type="text/javascript">
	var E = window.wangEditor;
	var editor = new E('#content');

	// 配置服务器端地址
	editor.customConfig.uploadImgServer = '/api/index/editUploadImage/';
	editor.customConfig.uploadImgMaxLength = 3;
	editor.create()
</script>
<script>
    var notice=$("[name='vb_id'] option:selected").data('notice');
    $("#notice").text(notice);
    $("#form").on("submit",function (e)
	{
        e.preventDefault();
        $("[name='content']").val(editor.txt.html());
        Admin.ajaxForm($(this));
	});
</script>